<?php
include 'config.php';
include 'opendb.php';

$name = mysql_real_escape_string($_GET['n'], $conn) ;
$port = mysql_real_escape_string($_GET['p'], $conn);
$ip = $_SERVER['REMOTE_ADDR'];

$query = "INSERT INTO SERVER SET IP='$ip', NAME='$name', PORT='$port';";
mysql_query($query, $conn) or die('ADD FAILED');

include 'closedb.php';
?>